package com.fpost.domain;

import java.util.Date;

public class Ip {
	
	private long ipId;
	private Long articleId;
	private String ipAddress;
	private String uri;
	private Date createdOn;
	private Long createdBy;
	private long lockSeqNum;
		
	public Ip() {
		super();
	}

	public Ip(Long articleId, String ipAddress, String uri, Date createdOn, Long createdBy) {
		super();
		this.articleId = articleId;
		this.ipAddress = ipAddress;
		this.uri = uri;
		this.createdOn = createdOn;
		this.createdBy = createdBy;
	}
	
	public long getIpId() {
		return ipId;
	}
	public void setIpId(long ipId) {
		this.ipId = ipId;
	}
	public Long getArticleId() {
		return articleId;
	}
	public void setArticleId(Long articleId) {
		this.articleId = articleId;
	}
	public String getIpAddress() {
		return ipAddress;
	}
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}
	public Date getCreatedOn() {
		return createdOn;
	}
	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}
	public Long getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}
	public long getLockSeqNum() {
		return lockSeqNum;
	}
	public void setLockSeqNum(long lockSeqNum) {
		this.lockSeqNum = lockSeqNum;
	}
	public String getUri() {
		return uri;
	}
	public void setUri(String uri) {
		this.uri = uri;
	}

	public void printDetails() {
		System.out.println("Ip details:");
		System.out.println("-ipId=" + ipId);
		System.out.println("-articleId=" + articleId);
		System.out.println("-ipAdress=" + ipAddress);
		System.out.println("-uri=" + uri);
		System.out.println("-createdOn=" + createdOn);
		System.out.println("-createdBy=" + (createdBy == null ? null : createdBy.longValue())); 
	}
}
